//
//  BindPhoneNumViewController.swift
//  DollBuy
//
//  Created by 郑东喜 on 2016/11/22.
//  Copyright © 2016年 郑东喜. All rights reserved.
//

import UIKit

class BindPhoneNumViewController: UITableViewController,BindPhoneDelegate {
    
    //导航栏设置还原
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.navigationController?.navigationBar.isHidden = false
        UIApplication.shared.statusBarStyle = UIStatusBarStyle.default
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        //设置标题
        self.navigationItem.title = "绑定手机号"
        
        //修改导航栏背景色
        self.navigationController?.navigationBar.barTintColor =
            UIColor.white
        
        tableView.separatorStyle = UITableViewCellSeparatorStyle.none
        setUI()
    }


}

// MARK:- 设置UI
extension BindPhoneNumViewController{
    func setUI() -> Void {
        let bindPhoneV = BindPhoneView()
        bindPhoneV.delegate = self
        bindPhoneV.frame = view.bounds
        view.addSubview(bindPhoneV)
    }
}

// MARK:- 获取代理事件
extension BindPhoneNumViewController {
    func bindSuccess() {
        print("触发绑定成功事件")
        self.navigationController!.popViewController(animated: true)
    }
}
